import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/login',
      name: 'login',
      component: require('@/views/login.vue').default
    },
    {
      path: '/home',
      name: 'home',
      component: require('@/views/home.vue').default
    },
    {
      path: '/setting',
      name: 'setting',
      component: require('@/views/setting/index.vue').default,
      children: [
        {
          path: 'gateway',
          name: 'gateway',
          component: require('@/views/gateway/index.vue').default
        },
        {
          path: '/user',
          name: 'user',
          component: require('@/views/user/index.vue').default
        },
        {
          path: '/gateway',
          name: 'gateway',
          component: require('@/views/gateway/index.vue').default
        },
        {
          path: '/ip',
          name: 'ip',
          component: require('@/views/ip/index.vue').default
        },
        {
          path: '/rtd',
          name: 'realTimeData',
          component: require('@/views/rtd/index.vue').default
        },
        {
          path: '/prdtInfo',
          name: '运维信息',
          component: require('@/views/product-info/index.vue').default
        }
      ]
    }
    
  ]
})
